﻿using MiniFox.Resources;
using System.ComponentModel.DataAnnotations;

namespace MiniFox.Platform.OAuth2.Models
{
    /// <summary>
    /// 重置密码请求模型
    /// </summary>
    public class ResetPassword
    {
        /// <summary>
        /// 票据
        /// </summary>
        [Display(Name = "LAB_Ticket", Prompt = "LAB_Ticket", ResourceType = typeof(Resources.ResMessage))]
        [Required(ErrorMessageResourceType = typeof(CommonMessages), ErrorMessageResourceName = "MSG_CommonRequired")]
        public string Ticket { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [Required(ErrorMessageResourceType = typeof(CommonMessages), ErrorMessageResourceName = "MSG_CommonRequired")]
        [Display(Name = "LAB_NewPwd", Prompt = "LAB_NewPwd", ResourceType = typeof(Resources.ResMessage))]
        [SecureString(SecureStringType.Password, ErrorMessageResourceType = typeof(CommonMessages), ErrorMessageResourceName = "MSG_CommonUnmatchRegex")]
        public string NewPassword { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [Compare("NewPassword", ErrorMessageResourceType = typeof(Resources.ResMessage), ErrorMessageResourceName = "ERR_UnmatchConfirmPassword")]
        [Display(Name = "LAB_ConfirmPwd", Prompt = "LAB_ConfirmPwd", ResourceType = typeof(Resources.ResMessage))]
        public string ConfirmPassword { get; set; }
        
    }
}
